GtkMenuTracker: cache result of hash lookup
authorRyan Lortie <desrt@desrt.ca>
Fri, 3 Jan 2014 21:13:01 +0000 (16:13 -0500)
committerRyan Lortie <desrt@desrt.ca>
Wed, 8 Jan 2014 19:21:17 +0000 (14:21 -0500)
commitfb14a78271de8171bcdc38b013766409f52ba141
treebb1873c5943a25fe679acea447844e2468e3e824
parent75ef6096c1a9717949410d3e819d053e28b530ed
GtkMenuTracker: cache result of hash lookup

Remove a hash lookup from the separator sync logic (which is run every
time we change a menu).  Instead, we do the lookup when creating the
section and cache the result.

This refactor will also help us in a future commit to add support for
hiding menu items based on missing actions.

https://bugzilla.gnome.org/show_bug.cgi?id=688421
gtk/gtkmenutracker.c